package vip.indo.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;
import vip.indo.enums.BusinessMshEnum;

/**
 * 自定义异常
 * @Author: tianlianyin
 * @Date: 2024/11/28 11:22
 * @Descripition:
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BusinessErrorException extends RuntimeException {
    private static final long serialVersionUID=-7480022450501760611L;
    /**
     * 业务错误码
     */
    private String code;
    /**
     * 业务错误信息
     */
    private String msg;
    public BusinessErrorException(BusinessMshEnum businessMshEnum){
        this.code=businessMshEnum.getCode();
        this.msg=businessMshEnum.getMsg();
    }
}
